package com.tuling.singleton;

public class DubbleCheckSingleton {

    private static volatile Object obj;

    public static void main(String[] args) {

    }
    private DubbleCheckSingleton() {

    }
    public static Object getInstance() {
        if(obj == null){
            synchronized (obj){
                if(obj == null){
                    return  new Object();
                }
            }
        }
        return obj;
    }
}
